chore: just specify major version to improve compatibility between dev tools#899
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the .node-version file format from 22.x.x to 22 to improve compatibility with version management tools like mise. The change simplifies the version specification to use only the major version number, which is a widely supported format across different version managers.
Key Changes:
- Simplified
.node-versionfrom22.x.xto22for better tool compatibility
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1 +1 @@ | |||
| 22.x.x | |||
| 22 | |||
There was a problem hiding this comment.
The .node-version file now specifies 22 but package.json has a more specific engine requirement of >=22.7.5. This creates an inconsistency where the .node-version file could resolve to Node.js 22.0.0 (or any 22.x version), which would not satisfy the minimum version requirement defined in package.json.
Consider either:
- Updating
.node-versionto22.7.5to match the minimum version inpackage.json, or - Updating
package.jsonengines field to>=22.0.0if the specific minimum version is not strictly required
This ensures developers using .node-version won't inadvertently use a Node.js version that doesn't meet the project's requirements.
| 22 | |
| 22.7.5 |
Motivation and Context
I noticed this while I was testing other issues on my end.
The
22.x.xformat in.node-versionwas not correctly interpreted by version management tools especially mise.This PR updates the format to
22, which is the standard notation widely supported by these tools and automatically resolves to the latest Node.js 22.x release.Existing setup-node action in CI does not affected by this. ref
How Has This Been Tested?
Breaking Changes
Types of changes
None of them - chore patch for local dev
Checklist
Additional context